$(document).ready(function() {
    function delete_user() {
        $('.delete-btn').click(function() {
            var uid = $(this).data('uid');
            $.ajax({
                type: 'DELETE',
                url: '/admin/user/' + uid,
                success: function(result) {
                    if (result > 0) {
                        $('.user-' + uid + '-container').remove();
                    } else {
                        alert('删除失败');
                    }
                }
            });
        })
    }
    delete_user();
})
